﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ToChucDeTail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            int loai = Convert.ToInt32(Request.QueryString["loai"]);
            int lang = 2;
            if (Request.QueryString["lang"] != "" && Request.QueryString["lang"] != null) lang = Convert.ToInt32(Request.QueryString["lang"]);

            ToChucDataSet gtDs = new ToChucHelper().LoadToChuc(loai, lang);
            repNavi.DataSource = gtDs;
            repNavi.DataBind();

            repSlider.DataSource = gtDs;
            repSlider.DataBind();
            string strTen = "";
            if (lang == 1)
            {
                strTen = "<a href='/ToChuc.aspx?lang=1'>Tổ chức</a> >> ";
            }
            else
            {
                strTen = "<a href='/ToChuc.aspx?lang=2'>Company</a> >> ";
            }
            //get pagename
            pagename = strTen + "<a href=''>" + LoaiDataHelper.LoadLoaiToChuc()[loai].ToString()+"</a>";

        }
    }

    object ds;
    string _pagename;
    public object DS
    {
        get { return ds; }
        set { ds = value; }
    }

    public string pagename
    {
        get { return _pagename; }
        set { _pagename = value; }
    }

    public string GetLink()
    {
        int loai = Convert.ToInt32(Request.QueryString["loai"]);
        string result = TrangTinhHelper.GetImageLogo("LinkToChuc" + loai);
        if (result == "logo.jpg")
        {
            result = "";
        }
        return result;
    }
}